const API = require('./../service')

module.exports = {
  home: async(ctx, next, id) => {
    const course = await API.course(id)
    const terms = await API.terms(id)
    const data = {
      course,
      terms
    }
    ctx.send({
      err_code: 0,
      data: data
    })
  }
}